home *** CD-ROM | disk | FTP | other *** search
- 32
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Previous
- --- RECORDSEPARATOR ---
- Platform:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Windows
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Description:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- baPrevious checks whether a previous instance of a projector or packaged file is
- --- RECORDSEPARATOR ---
- running.
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Usage:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Result = baPrevious( Activate )
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Arguments:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Integer.
- --- RECORDSEPARATOR ---
- If Activate is true, the previous instance is activated and brought to the front.
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Returns:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Integer.
- --- RECORDSEPARATOR ---
- Returns the window handle of the previous instance if one is running, else 0.
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Examples:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Director:
- --- RECORDSEPARATOR ---
- if baPrevious( true ) <> 0 then quit
- --- RECORDSEPARATOR ---
- Authorware:
- --- RECORDSEPARATOR ---
- if baPrevious( true ) <> 0 then quit(0)
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Notes:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Both Director and Authorware open their display windows before scripts are
- --- RECORDSEPARATOR ---
- executed. This means that the window of the second instance will appear before
- --- RECORDSEPARATOR ---
- the previous one can be activated.
- --- RECORDSEPARATOR ---
- Under Windows NT, this function will only find the first instance opened. For
- --- RECORDSEPARATOR ---
- example, if you open three copies of a projector, then quit the f
- --- RECORDSEPARATOR ---
- irst one, baPrevious
- --- RECORDSEPARATOR ---
- in the third projector will return 0 - it can not recognise the second projector as a
- --- RECORDSEPARATOR ---
- previous instance. Under Windows 95 and 3.1, the third projector will be able to
- --- RECORDSEPARATOR ---
- identify the second projector as a previous instance.
- --- RECORDSEPARATOR ---
- If you are using a full screen Director projector, this script will activate the previous
- --- RECORDSEPARATOR ---
- instance. The example given above will make the stage move to a new position.
- --- RECORDSEPARATOR ---
- set wnd = baPrevious( false )
- --- RECORDSEPARATOR ---
- if wnd <> 0 then
- --- RECORDSEPARATOR ---
- baWindowToFront( wnd )
- --- RECORDSEPARATOR ---
- quit
- --- RECORDSEPARATOR ---
- end if